<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        if (true) {
            console.log('true');
        }
        if (0) {//false
            console.log('0');
        }
        if (!0) {//true
            console.log('!0');
        }
        if (1) {//true
            console.log('1')
        }
        if ('') {//false
            console.log('空字符串');
        }
        if ('abc') {//true
            console.log('abc');
        }
    </script>
</body>
</html>